home *** CD-ROM | disk | FTP | other *** search
- ;RUN.WAS - by David Snyder
- ;Pops up a dialog box to choose a program to run
-
- ;Initialize variables
- integer app, choice
- string name, name1, name2, name3, name4
-
- proc main
- ;Edit the following variables to customize the script for
- ;running your choice of programs.
- ;The name variables are the programs corresponding to each menu
- ;choice
- name1="deskedit.exe"
- name2="wp.pif"
- name3="e:\wpwin\wpwin.exe"
- name4="g:\windows\util\winzip.exe"
-
- call choose_app
- choice=$DIALOG
- while choice != 1
- choice=$DIALOG
- switch choice
- case 10
- run name
- exit
- endcase
- case 11
- exitwhile
- endcase
- case 50
- switch app
- case 1
- name=name1
- endcase
- case 2
- name=name2
- endcase
- case 3
- name=name3
- endcase
- case 4
- name=name4
- endcase
- endswitch
- endcase
- endswitch
- endwhile
- exit
- endproc
-
- proc choose_app
- ;Edit the radiobutton strings to display the programs you wish
- ;to run, corresponding to the name string variables initialized
- ;above.
- dialogbox 2 14 157 127 2 "Run a program"
- radiobutton 30 36 90 10 "Text editor" app
- radiobutton 30 48 90 9 "DOS WordProcessor"
- radiobutton 30 60 90 10 "Windows WordProcessor"
- radiobutton 30 72 90 10 "ZIP file manager" endgroup
- pushbutton 25 104 40 14 "OK" normal
- pushbutton 81 104 40 14 "Cancel" cancel
- text 9 4 80 13 left "Choose a program to run"
- groupbox 22 22 111 68 "Programs" shadow
- enddialog
- endproc
-